/*
 RNAvigator is a tool for visualizing secondary structure of RNA
 Copyright 2012 Elias La Cour & Peter Bertelsen

 This file is part of RNAvigator.

 RNAvigator is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 RNAvigator is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with RNAvigator.  If not, see <http://www.gnu.org/licenses/>.
 */
package rnavigator.model;

/**
 * @author Elias la Cour & Peter Bertelsen. Class contains info for a base.
 * Stores info on: position = position in the nucleotide chain, nucleotide =
 * what nucleotide is stored, knot, pseudoknot = if nucleotide is part of a knot
 * or pseudoknot, mate = position of the matching nucleotide in the knot, 
 * drawPos = whether position should be drawn or not 
 */
public class Base {

    private int position = -1, mate = -1, nBases = -1;
    private String nucleotide;
    private boolean pseudoKnot = false, knot = false, drawPos = false;
    private double unitCircleX = 9.0, unitCircleY = 9.0;

    public Base() {
    }

    /**
     * @param nucleotide should be A, C, G, U
     * @param position determines position in the nucleotide chain
     */
    public Base(String nucleotide, int position) {
        this.nucleotide = nucleotide;
        this.position = position;
    }

    public Base(String nucleotide, int position, int mate) {
        this(nucleotide, position);
        this.mate = mate;
    }

    /**
     * @return the position
     */
    public int getPosition() {
        return position;
    }

    /**
     * @param position the position to set
     */
    public void setPosition(int position) {
        this.position = position;
    }

    /**
     * @return the mate
     */
    public int getMate() {
        return mate;
    }

    /**
     * @param mate the mate to set
     */
    public void setMate(int mate) {
        this.mate = mate;
    }

    /**
     * @return the nucleotide
     */
    public String getNucleotide() {
        return nucleotide;
    }

    /**
     * @param nucleotide the nucleotide to set
     */
    public void setNucleotide(String nucleotide) {
        this.nucleotide = nucleotide;
    }

    /**
     * @return the pseudoKnot
     */
    public boolean isPseudoKnot() {
        return pseudoKnot;
    }

    /**
     * @param pseudoKnot the pseudoKnot to set
     */
    public void setPseudoKnot(boolean pseudoKnot) {
        this.pseudoKnot = pseudoKnot;
    }

    /**
     * @return the knot
     */
    public boolean isKnot() {
        return knot;
    }

    /**
     * @param knot the knot to set
     */
    public void setKnot(boolean knot) {
        this.knot = knot;
    }

    /**
     * @return the unitCircleX
     */
    public double getUnitCircleX() {
        return unitCircleX;
    }

    /**
     * @param unitCircleX the unitCircleX to set
     */
    public void setUnitCircleX(double unitCircleX) {
        this.unitCircleX = unitCircleX;
    }

    /**
     * @return the unitCircleY
     */
    public double getUnitCircleY() {
        return unitCircleY;
    }

    /**
     * @param unitCircleY the unitCircleY to set
     */
    public void setUnitCircleY(double unitCircleY) {
        this.unitCircleY = unitCircleY;
    }

    /**
     * @return the nBases
     */
    public int getnBases() {
        return nBases;
    }

    /**
     * @param nBases the nBases to set
     */
    public void setnBases(int nBases) {
        this.nBases = nBases;
    }

    /**
     * @return the willDrawPos
     */
    public boolean willDrawPos() {
        return drawPos;
    }

    /**
     * @param willDrawPos the willDrawPos to set
     */
    public void setDrawPos(boolean drawPos) {
        this.drawPos = drawPos;
    }
}
